<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="../assets/css/article/article.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">文章列表</div>
        <div class="layui-card-body">
            <!-- 表单区 -->
            <form class="layui-form" action="" id="search">
                <div class="layui-form-item">

                    <div class="layui-inline">

                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="category" lay-verify="">
                                <!-- <option value="">请选择分类</option> -->
                                <!-- <option value="010">北京</option>
                                <option value="021">上海</option>
                                <option value="0571">杭州</option> -->
                            </select>
                        </div>

                        <div class="layui-input-inline" style="width: 200px;">
                            <select id="state" lay-verify="">
                                <option value="">请选择状态</option>
                                <option value="草稿">草稿</option>
                                <option value="已发布">已发布</option>
                                <!-- <option value="0571">杭州</option> -->
                            </select>
                        </div>
                    </div>

                    <div class="layui-inline">

                        <div class="layui-input-inline" style="width: 200px;">
                            <button class="layui-btn" lay-submit lay-filter="formDemo">筛选</button>
                        </div>
                    </div>

                </div>

            </form>
            <!-- end1 -->

            <!-- 表格区 -->
            <table class="layui-table">
                <colgroup>
                    <col width="35%">
                    <col width="17%">
                    <col width="17%">
                    <col width="17%">
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>文章标题</th>
                        <th>分类</th>
                        <th>发表时间</th>
                        <th>状态</th>
                        <th>操作</th>

                    </tr>
                </thead>
                <tbody>
                    <!-- <tr>
                        <td>浅谈</td>
                        <td>水水水水</td>
                        <td>2016-11-29</td>
                        <td>已发布</td>
                        <td>
                            <button type="button" class="layui-btn layui-btn-xs">编辑</button>
                            <button type="button" class="layui-btn  layui-btn-danger layui-btn-xs">删除</button>
                        </td>
                    </tr> -->

                </tbody>
            </table>
            <!-- end 2-->

            <!-- 分页区 -->
            <div id="page"></div>
            <!-- end3 -->
        </div>
    </div>
    <!-- template 文章列表模板 -->
    <script type="text/html" id="tpl-article">
    {{each data item}}
    <tr>
        <td>{{item.title}}</td>
        <td>{{item.cate_name}}</td>
        <td>{{item.pub_date}}</td>
        <td>{{item.state}}</td>
        <td>
            <button type="button" class="layui-btn layui-btn-xs">编辑</button>
            <button type="button" class="layui-btn  layui-btn-danger layui-btn-xs">删除</button>
        </td>
    </tr>

    {{/each}}
    </script>
    <!-- template 下拉框模板 -->
    <script type="text/html" id="tpl-category">
        <option value="">请选择分类</option>
        {{each data item}}
        <option value="{{item.id}}">{{item.name}}</option>
        {{/each}}
    </script>




    <script src="../assets/lib/jquery.js"></script>
    <script src="../assets/lib/layui/layui.all.js"></script>
    <script src="../assets/lib/template-web.js"></script>
    <script src="../assets/js/common.js"></script>
    <script src="../assets/js/article/article.js"></script>
</body>

</html>